<template>
  <input type="button" :value="btn" @click="addCount" />
  <br />
</template>

<script setup>
import { ref } from 'vue'
let count = ref(0)
let btn = ref(`点击次数:${count.value}`)
function addCount() {
  count.value++
  btn.value = `点击次数:${count.value}`
  emit('upBC', count.value)
}
const emit = defineEmits(['upBC'])
</script>
